package com.tau.egonetwork.gui;

import org.eclipse.swt.SWT;

import com.tau.egonetwork.common.Log;
import com.tau.egonetwork.gui.core.EgoNetworkMessageBox;

public class Program {

	public static void main(String[] args) {
		
        Log.startLog();

        try {
        	MainWindow.open();
        } catch (Exception e) {
			Log.writeExceptionToLog(e);
			//notify user:
			EgoNetworkMessageBox enmx =
					new EgoNetworkMessageBox(MainWindow.getDisplay().getShells()[0], SWT.ICON_ERROR, SWT.OK);
        	enmx.setText("Unexpected Error");
        	enmx.setMessage("Unexpected error has occurred. We're sorry for the inconvenience.");
        	enmx.open();
        	System.exit(-1);
        }
	}

}
